﻿@model IEnumerable<KCMS.Web.Models.ProductImageViewModel>
@using KCMS.Helpers
@if (Model.Count() != 0)
{
    <div class="product-list-item-image-big">
    @if (Model.First().ImageFile == null)
    {
        <img src="@Url.ContentImageUpload("deafult.jpg")" alt="" />
    }
    else
    {
    <img src="@Url.ContentImageUpload(@Model.First().ColorImageFile)" alt="" />
    }
    </div>
}
else
{
    <img src="@Url.ContentImageUpload("deafult.jpg")" alt="" />
}
<ul class="product-item-color-list">
@foreach (var item in Model)
{
    
    if (item.ColorImageFile != null)
    {
        <li>
    <img src="@Url.ContentImageUpload(@item.ColorImageFile)" alt=""/>
        </li>
    }
}
</ul>